/*
 * @Author: tom
 * @Date: 2022-10-31 10:50:12
 * @LastEditors: 阿航
 * @LastEditTime: 2022-10-31 10:52:38
 * @FilePath: \shop\src\api\user.js
 */
import {get, post, put, del} from '../utils/request'
// /api/v1/admin/user
// 获取商品信息
export const getUserList = (data) => get('/api/v1/admin/user', data)

// 新增商品信息
export const addProducts = (params) => post('/api/v1/admin/product', params)
// 根据id查询商品信息
export const getByIdProducts = (id) => put(`/api/v1/admin/product/${id}`)

// 修改商品信息
export const modifyProduct = (params, id) =>
  put(`/api/v1/admin/product/${id}`, params)

// 删除商品
export const delProduct = (id) => del(`/api/v1/admin/product/${id}`)
